#include <stdio.h>
#define M 3
#define N 4
#define abs(x) ((x) >= 0 ? (x) : -(x))
int main()
{   	      
  int a[M][N];
  int i,j;

  printf("Please input an 3*4 matrix:\n");
  for (i = 0; i < M; i ++)
    for (j = 0; j < N; j ++)
      scanf("%d", &a[i][j]);

  int c[N];


  for (i = 0; i < M; i ++) {   	      
    c[i] = 0;
    for (j = 0; j < N; j ++)
      c[i] += abs(a[i][j]);
  }

  int max = c[0];

  for (i = 1; i < M; i ++)
    if (max < c[i])
      max = c[i];

  printf("%d\n", max);
  return 0;
}   	   